<?php
session_start();
unset($_SESSION['admin_emai']);
unset($_SESSION['admin_name']);

date_default_timezone_set("PRC");

$dsn="mysql:Server=127.0.0.1;dbname=blog";
$db= new PDO($dsn, "root", "123456");
$db ->exec("set names utf8mb4");

$sql ="select * from admin order by admin_id desc";
$result =$db->query($sql);
$adminList =$result->fetchAll(PDO::FETCH_ASSOC);
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="css/mian.css" />
</head>
<body>
<div id="container">
    <div id="top">
        <h1>博客管理系统</h1>
                <div id="top_id">
                    欢迎您：<?php echo $_SESSION['admin_name']; ?>
                    <a href="logout.php">退出登录</a>
                </div>
    </div>
    <div id="left">
        <ul>
            <li><a href="category_list.php">分类管理</a></li>
            <li><a href="article_list.php">新闻管理</a></li>
            <li><a href="admin_list.php">管理员</a></li>
        </ul>
    </div>
    <div id="right">
        <div id="right_tao">
            <a href="article_list.php">首页</a>
            <a href="admin_list.php">管理员管理</a>
            <a href="admin_add.php">增加管理员</a>
            <div id="ad_table_list">
                <form action="admin_add_save.php" method="post">
                    <table border="" cellspacing="" cellpadding="">
                        <tr>
                            <td>邮箱:</td>
                            <td><input type="text" name="admin_id"  /></td>
                        </tr>
                        <tr>
                            <td>管理员姓名：</td>
                            < <td><input type="text" name="admin_name"  /></td>
                        </tr>
                        <tr>
                            <td>密码：</td>
                            <td><input type="text" name="admin_password"  /></td>
                        </tr>
                        <tr>
                            <td>确认密码:</td>
                            <td><input type="text" name="admin_password"  /></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><input type="submit" value="提交"  class="but" />
                                <input type="reset" value="重置"  class="but" /></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
